{namespace n=Tx_News_ViewHelpers}

<div class="mediaelement">
	<n:format.dam as="dam" uid="{mediaElement.uid}">
		<f:if condition="{settings.detail.media.image.lightbox}">
			<f:then>
				<a rel="{settings.detail.media.image.lightbox}" title="{dam.caption}" href="{f:uri.image(src:'{dam.file_path}{dam.file_name}' maxWidth:'800')}">
					<f:image src="{dam.file_path}{dam.file_name}" title="{dam.title}" alt="{dam.alt_text}" maxWidth="{settings.detail.media.image.maxWidth}" maxHeight="{settings.detail.media.image.maxHeight}" />
				</a>
			</f:then>
			<f:else>
				<f:image src="{dam.file_path}{dam.file_name}" title="{dam.title}" alt="{dam.alt_text}" maxWidth="{settings.detail.media.image.maxWidth}" maxHeight="{settings.detail.media.image.maxHeight}" />
			</f:else>
		</f:if>
	</n:format.dam>
</div>